using System;
using System.Data;

using Wicresoft.Common;

namespace Wicresoft.Busi.Entity
{
	[Table("vwMeetingRoomGroups", null, "Busi.ConnectionString")]
	public class vwMeetingRoomGroups : ViewInfo
	{
		#region SQL column name consts 
		public const string SQLCOL_ID = "ID";
		public const string SQLCOL_ROOMTYPE = "RoomType";
		public const string SQLCOL_ROOMNAME = "RoomName";
		public const string SQLCOL_LOCATION = "Location";
		public const string SQLCOL_SEATSCOUNT = "SeatsCount";
		public const string SQLCOL_PICTURE = "Picture";
		public const string SQLCOL_GROUPID = "GroupID";
		public const string SQLCOL_GROUPNAME = "GroupName";
		public const string SQLCOL_CONSERVATOR = "Conservator";
		public const string SQLCOL_CONSERVATORNAME = "ConservatorName";
		public const string SQLCOL_DESCRIPTION = "Description";
		public const string SQLCOL_FLAG = "Flag";
		public const string SQLCOL_BACKNVARCHAR = "BackNvarchar";
		public const string SQLCOL_BACKNVARCHAR1 = "BackNvarchar1";
		public const string SQLCOL_BACKINT = "BackInt";
		public const string SQLCOL_CANAPPLYGROUPID = "CanApplyGroupID";
		public const string SQLCOL_CANAPPLYGROUPNAME = "CanApplyGroupName";
		public const string SQLCOL_FLAGCN = "FlagCN";
		public const string SQLCOL_ROOMTYPECN = "RoomTypeCN";
		#endregion


		#region Contructors
		/// <summary>
		/// Construct empty entity
		/// </summary>
		public vwMeetingRoomGroups () {}

		#endregion

		public override void Init (DataRow row)
		{
			ID = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_ID]);
			RoomType = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_ROOMTYPE]);
			RoomName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_ROOMNAME]);
			Location = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_LOCATION]);
			SeatsCount = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_SEATSCOUNT]);
			Picture = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_PICTURE]);
			GroupID = (Guid)ObjectType.GuidTypeHelper.Read(row[SQLCOL_GROUPID]);
			GroupName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_GROUPNAME]);
			Conservator = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_CONSERVATOR]);
			ConservatorName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_CONSERVATORNAME]);
			Description = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_DESCRIPTION]);
			Flag = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_FLAG]);
			BackNvarchar = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_BACKNVARCHAR]);
			BackNvarchar1 = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_BACKNVARCHAR1]);
			BackInt = (int)ObjectType.IntTypeHelper.Read(row[SQLCOL_BACKINT]);
			CanApplyGroupID = (Guid)ObjectType.GuidTypeHelper.Read(row[SQLCOL_CANAPPLYGROUPID]);
			CanApplyGroupName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_CANAPPLYGROUPNAME]);
			FlagCN = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_FLAGCN]);
			RoomTypeCN = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_ROOMTYPECN]);
		}

		#region Properties 
		#region Property <int> ID
		[Property("ID", 4, SqlDbType.Int, false, false)]
		public int ID 
		{
			get { return _ID; }
			set { _ID = value; }
		}
		private int _ID = int.MinValue;
		#endregion

		#region Property <int> RoomType
		[Property("RoomType", 4, SqlDbType.Int, false, false)]
		public int RoomType 
		{
			get { return _RoomType; }
			set { _RoomType = value; }
		}
		private int _RoomType = int.MinValue;
		#endregion

		#region Property <string> RoomName
		[Property("RoomName", 100, SqlDbType.NVarChar, false, false)]
		public string RoomName 
		{
			get { return _RoomName; }
			set { _RoomName = value; }
		}
		private string _RoomName = null;
		#endregion

		#region Property <string> Location
		[Property("Location", 200, SqlDbType.NVarChar, false, false)]
		public string Location 
		{
			get { return _Location; }
			set { _Location = value; }
		}
		private string _Location = null;
		#endregion

		#region Property <int> SeatsCount
		[Property("SeatsCount", 4, SqlDbType.Int, false, false)]
		public int SeatsCount 
		{
			get { return _SeatsCount; }
			set { _SeatsCount = value; }
		}
		private int _SeatsCount = int.MinValue;
		#endregion

		#region Property <string> Picture
		[Property("Picture", 100, SqlDbType.NVarChar, false, false)]
		public string Picture 
		{
			get { return _Picture; }
			set { _Picture = value; }
		}
		private string _Picture = null;
		#endregion

		#region Property <Guid> GroupID
		[Property("GroupID", 16, SqlDbType.UniqueIdentifier, false, false)]
		public Guid GroupID 
		{
			get { return _GroupID; }
			set { _GroupID = value; }
		}
		private Guid _GroupID = Guid.Empty;
		#endregion

		#region Property <string> GroupName
		[Property("GroupName", 200, SqlDbType.NVarChar, false, false)]
		public string GroupName 
		{
			get { return _GroupName; }
			set { _GroupName = value; }
		}
		private string _GroupName = null;
		#endregion

		#region Property <string> Conservator
		[Property("Conservator", 40, SqlDbType.NVarChar, false, false)]
		public string Conservator 
		{
			get { return _Conservator; }
			set { _Conservator = value; }
		}
		private string _Conservator = null;
		#endregion

		#region Property <string> ConservatorName
		[Property("ConservatorName", 100, SqlDbType.NVarChar, false, false)]
		public string ConservatorName 
		{
			get { return _ConservatorName; }
			set { _ConservatorName = value; }
		}
		private string _ConservatorName = null;
		#endregion

		#region Property <string> Description
		[Property("Description", 1000, SqlDbType.NVarChar, false, false)]
		public string Description 
		{
			get { return _Description; }
			set { _Description = value; }
		}
		private string _Description = null;
		#endregion

		#region Property <string> Flag
		[Property("Flag", 1, SqlDbType.Char, false, false)]
		public string Flag 
		{
			get { return _Flag; }
			set { _Flag = value; }
		}
		private string _Flag = null;
		#endregion

		#region Property <string> BackNvarchar
		[Property("BackNvarchar", 100, SqlDbType.NVarChar, false, false)]
		public string BackNvarchar 
		{
			get { return _BackNvarchar; }
			set { _BackNvarchar = value; }
		}
		private string _BackNvarchar = null;
		#endregion

		#region Property <string> BackNvarchar1
		[Property("BackNvarchar1", 100, SqlDbType.NVarChar, false, false)]
		public string BackNvarchar1 
		{
			get { return _BackNvarchar1; }
			set { _BackNvarchar1 = value; }
		}
		private string _BackNvarchar1 = null;
		#endregion

		#region Property <int> BackInt
		[Property("BackInt", 4, SqlDbType.Int, false, false)]
		public int BackInt 
		{
			get { return _BackInt; }
			set { _BackInt = value; }
		}
		private int _BackInt = int.MinValue;
		#endregion

		#region Property <Guid> CanApplyGroupID
		[Property("CanApplyGroupID", 16, SqlDbType.UniqueIdentifier, false, false)]
		public Guid CanApplyGroupID 
		{
			get { return _CanApplyGroupID; }
			set { _CanApplyGroupID = value; }
		}
		private Guid _CanApplyGroupID = Guid.Empty;
		#endregion

		#region Property <string> CanApplyGroupName
		[Property("CanApplyGroupName", 200, SqlDbType.NVarChar, false, false)]
		public string CanApplyGroupName 
		{
			get { return _CanApplyGroupName; }
			set { _CanApplyGroupName = value; }
		}
		private string _CanApplyGroupName = null;
		#endregion

		#region Property <string> FlagCN
		[Property("FlagCN", 100, SqlDbType.NVarChar, false, false)]
		public string FlagCN 
		{
			get { return _FlagCN; }
			set { _FlagCN = value; }
		}
		private string _FlagCN = null;
		#endregion

		#region Property <string> RoomTypeCN
		[Property("RoomTypeCN", 100, SqlDbType.NVarChar, false, false)]
		public string RoomTypeCN 
		{
			get { return _RoomTypeCN; }
			set { _RoomTypeCN = value; }
		}
		private string _RoomTypeCN = null;
		#endregion
		#endregion
	}
}
